﻿<UserControl
    x:Class="XnReader.WinRT.ToolBar"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="90">
    <Grid >
        <StackPanel x:Name="spLeft" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,0,0,0">
            <Button x:Name="btnSearch" Visibility="{Binding VisibleSearch}" AutomationProperties.Name="查询" Content="" Style="{StaticResource StyleToolBar}" Click="ButtonClick"/>
            <Button x:Name="btnRefresh" Visibility="{Binding VisibleRefresh}" AutomationProperties.Name="刷新" Content="" Style="{StaticResource StyleToolBar}" Click="ButtonClick"/>
            <Button x:Name="btnLogin" Visibility="{Binding VisibleLogin}" AutomationProperties.Name="登陆" Content="" Style="{StaticResource StyleToolBar}" Click="ButtonClick"/>
            <Button x:Name="btnAddStore" Visibility="{Binding VisibleAddStore}" AutomationProperties.Name="收藏" Content="" Style="{StaticResource StyleToolBar}" Click="ButtonClick"/>
            <Button x:Name="btnCommend" Visibility="{Binding VisibleCommend}" AutomationProperties.Name="推荐" Content="" Style="{StaticResource StyleToolBar}" Click="ButtonClick"/>
            <Button x:Name="btnDelStore" Visibility="{Binding VisibleDelStore}" AutomationProperties.Name="下架" Content="" Style="{StaticResource StyleToolBar}" Click="ButtonClick"/>
            <Button x:Name="btnBookReader"  Visibility="{Binding VisibleBookReader}" AutomationProperties.Name="目录" Content="" Style="{StaticResource StyleToolBar}" Click="ButtonClick"/>
            <Button x:Name="btnSetting" Visibility="{Binding VisibleSetting}" AutomationProperties.Name="设置" Content="" Style="{StaticResource StyleToolBar}" Click="ButtonClick"/>
        </StackPanel>
        <StackPanel x:Name="spRight" HorizontalAlignment="Right" Orientation="Horizontal" Margin="0,0,10,0" >
            <Button x:Name="btnRights" Visibility="{Binding VisibleRights}" AutomationProperties.Name="版权说明" Content="ᚱ" Style="{StaticResource StyleToolBar}" Click="ButtonClick"/>
            <Button x:Name="btnProtocol" Visibility="{Binding VisibleProtocol}" AutomationProperties.Name="用户协议" Content="⚐" Style="{StaticResource StyleToolBar}" Click="ButtonClick"/>
            <Button x:Name="btnContactUs" Visibility="{Binding VisibleContactUs}" AutomationProperties.Name="联系我们" Content="" Style="{StaticResource StyleToolBar}" Click="ButtonClick"/>
        </StackPanel>
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="ApplicationViewStates">
                <VisualState x:Name="FullScreenLandscape"/>
                <VisualState x:Name="Filled"/>

                <!-- 整页采用较窄的 100 像素页边距约定(纵向)-->
                <VisualState x:Name="FullScreenPortrait">
                </VisualState>
                <!--
                    对齐后，后退按钮和标题的样式将有所不同，并且在所有其他视图状态中显示的网格将
                    替换为列表表示形式
                -->
                <VisualState x:Name="Snapped">
                    <Storyboard>
                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName="spLeft" Storyboard.TargetProperty="Margin">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="0"/>
                        </ObjectAnimationUsingKeyFrames>-->
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="spRight" Storyboard.TargetProperty="Margin">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="0"/>
                        </ObjectAnimationUsingKeyFrames>
                        <!--<ObjectAnimationUsingKeyFrames Storyboard.TargetName="btnRight" Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                        </ObjectAnimationUsingKeyFrames>-->
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
    </Grid>
</UserControl>
